<?php
spl_autoload_register('myautoload');
function myautoload( $classname ) {
	$classname = str_replace('_','/', $classname);
	$path = "./lib/classes/$classname.class.php";
	if( file_exists( $path ) ) require( $path );
	else { 
		throw new Exception('Could not find class');
	}
}